<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
#macro ( genericTree $somelist ) 
#foreach ( $some in $somelist )
<option value="$!some.id">
#if($!some.level>0)
#foreach($count in [-1..$!some.level])&nbsp;#end #end $!some.className</option>
#genericTree($some.childs) 
#end 
#end
<!--[if IE]>
<style type="text/css">
.input{behavior: url($!webPath/resources/style/common/css/ie-css3.htc);}
</style>
<![endif]-->
<link href="$!webPath/resources/style/system/manage/$!{config.websiteCss}/template.css"  rel="stylesheet" type="text/css"/>
<link  href="$!webPath/resources/style/common/css/jquery-ui-1.8.22.custom.css" type=text/css rel=stylesheet>
<script src="$!webPath/resources/js/jquery-1.8.3.min.js"></script>
<script src="$!webPath/resources/js/jquery.shop.common.js"></script>
<script src="$!webPath/resources/js/jquery.poshytip.min.js"></script>
<script src="$!webPath/resources/js/jquery-ui-1.8.21.js"></script>
<script src="$!webPath/resources/js/jquery.zh.cn.js"></script>
<script>
jQuery(document).ready(function(){
 jQuery('#coupon_begin_time').attr("readonly","readonly").datepicker({
	  dateFormat:"yy-mm-dd",
	  changeMonth: true,
	  changeYear: true
  });
  jQuery('#coupon_end_time').attr("readonly","readonly").datepicker({
	  dateFormat:"yy-mm-dd",
	  changeMonth: true,
	  changeYear: true
  });
});
//
function ajax_update(id,fieldName,obj,value){
   var val;
   if(value==undefined){
	 val=jQuery(obj).val();
   }else val=value; 
   jQuery.ajax({type:'POST',
	              url:'$!webPath/admin/coupon_ajax.htm',
				  data:{"id":id,"fieldName":fieldName,"value":val},
				beforeSend:function(){
				  
				},
			   success:function(data){
	             if(val==""){
				   jQuery(obj).attr("src","$!webPath/resources/style/system/manage/blue/images/"+data+".png");
				 }else{
				   jQuery(obj).val(val);
				 }    
				 if(value!=undefined){
				   jQuery(obj.parentNode.parentNode).remove();
				 }
              }
	    });
}
</script>
</head>
<body scroll="yes">
<div class="cont">
  <h1 class="seth1">优惠券管理</h1>
  <div class="settab"> 
	<span class="tab-one"></span> <span class="tabs"> 
	<a href="$!webPath/admin/coupon_list.htm">所有优惠券</a>|<a href="$!webPath/admin/coupon_add.htm">新增优惠券</a>|<a href="$!webPath/admin/coupon_info_list.htm?coupon_id=$!coupon_id" class="this">发放列表</a></span> 
  <span class="tab-two"></span>	</div>
  <form name="ListForm" id="ListForm" action="" method="post">
    <div class="brandtable">
      <table width="100%" border="0" cellspacing="0" cellpadding="0" class="brand_table">
        <tr style="background: #if($!config.websiteCss=='blue') #2A7AD2 #end 
      #if($!config.websiteCss=='black')#333 #end; height:30px; color:#FFF">
          <td width="1%">&nbsp;</td>
          <td width="25%">优惠券编号</td>
          <td width="12%">优惠券金额</td>
          <td width="12%">发放用户</td>
          <td width="10%">优惠券状态</td>
          <td width="10%">发放时间</td>
        </tr>
      #foreach($obj in $objs)
        <tr>
          <td align="center">&nbsp;</td>
          <td>$!obj.coupon_sn</td>
          <td>$!obj.coupon.coupon_amount</td>
          <td>$!obj.user.userName</td>
          <td>#if($!obj.status==0)未使用#else 已使用#end</td>
          <td>$!CommUtil.formatLongDate($!obj.addTime)</td>
      </tr>
     #end
	
    </table>
	  <div class="fenye" align="right">
       <span id="queryCondition" style="display:none">
		   #foreach($sm in $sms)
<input name="$!sm.key" id="$!sm.key" type="hidden" value="$!sm.value"/>
		   #end
	 </span>
	   <input name="currentPage" type="hidden" id="currentPage" value="$!currentPage" />
      $!gotoPageFormHTML </div>
    </div>
  </form>
</div>
</body>
</html>
